package org.marketlive.entity;

/*
(C) Copyright MarketLive. 2006. All rights reserved.
MarketLive is a trademark of MarketLive, Inc.
Warning: This computer program is protected by copyright law and international treaties.
Unauthorized reproduction or distribution of this program, or any portion of it, may result
in severe civil and criminal penalties, and will be prosecuted to the maximum extent
possible under the law.
*/

/**
 * Marker interface for a Cloneable Attribute Page definition. A class
 * implementing {@link org.marketlive.entity.IAttributePage} also
 * implements the <code>ICloneableAttributePage</code> interface to
 * indicate to the {@link java.lang.Object#clone()} method that it is
 * legal for that method to make a field-for-field copy of instances
 * of that class.
 * <p/>
 * This interface contains the <code>clone</code> method, with the intent
 * that implementing classes use it to override <code>Object.clone</code>.
 * <p/>
 * Code example:
 * <pre>
 * public Object clone() {
 *     try {
 *         return super.clone();
 *     } catch (CloneNotSupportedException e) {
 *         log.error("Failed to clone attribute page " + this.getName(), e);
 *         throw e;
 *     }
 * }
 * </pre>
 * <p/>
 * @see org.marketlive.entity.IAttributePage
 * @see org.marketlive.entity.IComplexAttributePage
 * @see org.marketlive.entity.IComplexAttribute
 * @see org.marketlive.entity.IEntity
 * @see org.marketlive.entity.IEntityHome
 * @see java.lang.Cloneable
 * @see java.lang.Object#clone()
 */
public interface ICloneableAttributePage extends Cloneable {
    /**
     * Returns a copy of the attribute page instance. Used for overriding <code>Object.clone()</code>.
     *
     * @return a copy of this <code>IAttributePage</code>
     */
    Object clone();

}
